<template>
  <div class="user">
    <h3>用户信息</h3>
    <ul>
      <li>用户名: {{ user.name }}</li>
      <li>年龄: {{ user.age }}</li>
      <li>邮箱: {{ user.email }}</li>
      <li>手机: {{ user.phone }}</li>
    </ul>
  </div>
</template>

<script setup>
const props = defineProps({
  user:{
    type: Object,
    required: true
  }
})
</script>

<style scoped>
.user{
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 4px;
  width: 200px;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
li {
  margin-bottom: 5px;
}
</style>
